Predicting life expectancy#
1. Only education and GDP have an impact on life expectancy#
As seen in the dataset, it’s very common for countries with a good education to also have a high life expectancy. To make it more clear, the data can be visualized in this Bivariate Choropleth:
In this image, the left side of the legend is the education level, and the right side is the life expectancy. As shown, almost all countries with good education quality also have a high life expectancy. The reasoning behind this might be that people with better education tend to choose for a healthier way of life. It can also be visualized in the following way. This plot shows the rate in which people finish primary and secondary school, compared to the life expectancy of said person. This graph makes clear that people with better education tend to have a higher life expectancy. A reason for this increase in life expectancy comes from the fact that people with a better education make better choices. (Raghupathi & Raghupathi, 2020b)
Education level#
Assuming education is the only factor that predicts life expectancy in a country, a closer assessment is needed to determine which sector should be invested in.
Second plot#
GDP Argument (Second argument)#
We can also argue that a society with a good education will produce an increasing GDP. Research at the university of Munich has shown that people with a better education are able to achieve jobs with more complex skill sets, resulting in a higher paying job. If people in a society are able to keep higher paying jobs, the GDP from the country of origin will increase. This in turn will influence the life expectancy of a country. Research originating from the University of Zagreb has shown that an increase in GDP of a country, also has a positive influence on the country’s life expectancy. This is confirmed when you convert the data into a Bivariate Chropleth or a scatter plot (with a regression). These charts show the GDP of a country and the country’s life expectancy. This means that the increase in education gives an increase in GDP which delivers an increase in life expectancy.
Show code cell source
# import numpy as np
# import pandas as pd
# import plotly.graph_objs as go
# from scipy.optimize import curve_fit
# from scipy.stats import zscore
# import matplotlib.pyplot as plt
# def log_func(x, a, b):
# return a * np.log(x) + b
# # Calculate the z-scores of the data
# second_df['z_score_GDP'] = zscore(second_df['GDP'])
# second_df['z_score_Value'] = zscore(second_df['Value'])
# # Define a threshold to identify outliers
# threshold = 6
# # Filter the data to remove outliers
# filtered_df = second_df[(np.abs(second_df['z_score_GDP']) < threshold) & (np.abs(second_df['z_score_Value']) < threshold)]
# # Extract cleaned data for fitting
# x_cleaned = filtered_df["GDP"].values
# y_cleaned = filtered_df["Value"].values
# # Fit the data to the logarithmic function
# popt, pcov = curve_fit(log_func, x_cleaned, y_cleaned)
# # Generate x values for the fitted line
# x_fit = np.linspace(min(x_cleaned), max(x_cleaned), 100)
# y_fit = log_func(x_fit, *popt)
# # Plot using Plotly
# scatter = go.Scatter(x=filtered_df["GDP"], y=filtered_df["Value"], mode='markers', name='Data')
# line = go.Scatter(x=x_fit, y=y_fit, mode='lines', name='Fit', line=dict(color='red'))
# layout = go.Layout(title='GDP vs. Life Expectancy (Outliers Removed)',
# xaxis=dict(title='GDP (normalized)'),
# yaxis=dict(title='Completion rate (normalized)'))
# # Optionally, you can use matplotlib to show the fit
# plt.scatter(filtered_df['GDP'], filtered_df['Value'], alpha=0.3, c='green', label='Data')
# plt.plot(x_fit, y_fit, color='red', label='Fit')
# plt.xlabel('GDP (normalized)')
# plt.ylabel('Lower secondary completion rate (normalized)')
# plt.title('GDP vs. Education')
# plt.legend()
# plt.tight_layout()
# plt.show()
2. Other factors should also be considered#
Even though A country investing in their education program results in an increase in life expectancy. There are more direct approaches to increasing a country’s life expectancy. One possible solution is investing in increasing the country’s vaccination rate. Diseases or viruses like Polio and Diphtheria can be fatal if not treated appropriately, in some cases (like for polio) there is no cure at all. Not treating these diseases results in a drastic decrease in life expectancy. So instead of investing in education to improve life expectancy, a country should invest in vaccines as this has a more direct effect. This can be seen in the plot where it shows an increase in vaccination rate for polio and Diphtheria corresponds with an increase in life expectancy. This is also found in the research by Jenifer Ehreth. Which concludes that improving the vaccination rate is a big factor in increasing a country’s life expectancy. https://www.sciencedirect.com/science/article/pii/S0264410X03003773
Unhealthy lifestyles#
The prevelance of unhealthy lifestyles in (developed) countries may also contribute to life expectancy.
Counter argument 2#
Another way to increase life expectancy is to invest in cleaner and safer drinking water. Unsafe drinking water is the cause of a lot of different diseases, all of which can cause a person to live a shorter life. It can be seen in the graph that an increase in the amount of people that drink from a safe water source correlates with an increase in life expectancy, this also supported by the following research paper, Angelakis et al. (2021b). This means that it should be useful for a country to invest in a clean water source before it starts to invest in different areas.
The impact of vaccination#
Another factor to consider is
Conclusion#
hier moet nog een conclusie komen
References#
Raghupathi, V., & Raghupathi, W. (2020). The influence of education on health: an empirical assessment of OECD countries for the period 1995–2015. Archives Of Public Health, 78(1). https://doi.org/10.1186/s13690-020-00402-5
Ehreth, J. (2003). The value of vaccination: a global perspective. Vaccine, 21(27–30), 4105–4117. https://doi.org/10.1016/s0264-410x(03)00377-3
Angelakis, A. N., Vuorinen, H. S., Nikolaidis, C., Juuti, P. S., Katko, T. S., Juuti, R. P., Zhang, J., & Samonis, G. (2021). Water Quality and Life Expectancy: Parallel Courses in Time. Water, 13(6), 752. https://doi.org/10.3390/w13060752